#ifndef PHYSICAL_20180117
#define PHYSICAL_20180117

#include <GL/gl.h>

typedef struct
{
	GLfloat x;
    GLfloat y;
}Point,Vec2D;

typedef struct
{
    GLfloat width;
    GLfloat height;
}Size,Texture2DSize;

enum JumpState
{
    JUMPSTATE_DOWN = 0,
    JUMPSTATE_UP
};

typedef struct physical_data
{
	JumpState jumpState;
	Point point;
	Size size;
	GLfloat velocity;
}Physical_Data;


static inline Vec2D operator -(const Vec2D& vec2){return Vec2D{-vec2.x,-vec2.y};}
static inline Vec2D operator +(const Vec2D& v1,const Vec2D& v2){return Vec2D{v1.x + v2.x,v1.y + v2.y};}
static inline Vec2D operator -(const Vec2D& v1,const Vec2D& v2){return v1 + (-v2);}
static inline bool operator ==(const Vec2D& v1,const Vec2D& v2){return (v1.x == v2.x)&&(v1.y == v2.y);}
#endif
